package com.spring.bean.demo8;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

public class ProductService {
    @Autowired
    @Qualifier("categoryDao")
    private CategoryDao categoryDao;

    @Autowired
    @Qualifier("productDao")
    private ProductDao productDao;

    public void save () {
        System.out.println("ProductService 的 save 方法执行了");
        categoryDao.save();
        productDao.save();
    }
}
